﻿#ifndef MCN_CAR_OBJECT_H
#define MCN_CAR_OBJECT_H

#include "mbase_object.h"
#include "socket_item.h"
#include "plug_item.h"
#include <QPainter>
#include <QComboBox>

class mCN_car_object : public MBaseObject
{
public:

    enum {Type = UserType + 5};
    int type() const override { return Type; }

    explicit mCN_car_object(mCN_car_object *parent = nullptr);
    ~mCN_car_object() Q_DECL_OVERRIDE;

    QRectF boundingRect() const Q_DECL_OVERRIDE;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE;
    MBaseObject::OBJTYPE objType() const  Q_DECL_OVERRIDE { return CN_car; }

    //对外访问接口
    PlugObject* getplugMleft() const {return plugMleft;}
    PlugObject* getplugMright() const {return plugMright;}
    SocketObject* getsocketFLeft() const {return socketFLeft;}
    SocketObject* getsocketFright() const {return socketFright;}

private:
    PlugObject *plugMleft;
    PlugObject* plugMright;
    SocketObject* socketFLeft;
    SocketObject* socketFright;


};

#endif // MCN_CAR_OBJECT_H
